<html>
<head><meta charset="utf-8"><title>cargo for rustc · t-compiler/help · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/index.html">t-compiler/help</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/cargo.20for.20rustc.html">cargo for rustc</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="204676254"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/cargo%20for%20rustc/near/204676254" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jason Hu <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/cargo.20for.20rustc.html#204676254">(Jul 22 2020 at 14:52)</a>:</h4>
<p>It's probably a random question: why are we using a separate <code>x.py</code> for build of rustc, instead of using cargo? I can see many disadvantages of <code>x.py</code> liking rebuilding after certain actions. I am just wondering what's the motivation behind.</p>



<a name="204676464"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/cargo%20for%20rustc/near/204676464" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/cargo.20for.20rustc.html#204676464">(Jul 22 2020 at 14:54)</a>:</h4>
<p>cargo is insufficiently powerful currently for staged builds and such</p>



<a name="204676499"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/cargo%20for%20rustc/near/204676499" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/cargo.20for.20rustc.html#204676499">(Jul 22 2020 at 14:54)</a>:</h4>
<p>we're slowly moving towards more cargo and less custom tooling atop it, though</p>



<a name="204676551"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/cargo%20for%20rustc/near/204676551" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lzutao <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/cargo.20for.20rustc.html#204676551">(Jul 22 2020 at 14:54)</a>:</h4>
<p>It is documented somewhat at <a href="https://rustc-dev-guide.rust-lang.org/building/bootstrapping.html#bootstrapping-the-compiler">https://rustc-dev-guide.rust-lang.org/building/bootstrapping.html#bootstrapping-the-compiler</a></p>



<a name="204677201"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/cargo%20for%20rustc/near/204677201" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/cargo.20for.20rustc.html#204677201">(Jul 22 2020 at 14:58)</a>:</h4>
<blockquote>
<p>liking rebuilding after certain actions</p>
</blockquote>
<p>Give rebuilding LLVM 2-3 times a shot to compare the alternative ;-)</p>



<a name="204677773"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/cargo%20for%20rustc/near/204677773" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Goat <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/cargo.20for.20rustc.html#204677773">(Jul 22 2020 at 15:03)</a>:</h4>
<blockquote>
<p>we're slowly moving towards more cargo and less custom tooling atop it, though</p>
</blockquote>
<p>Isn't<code>cargo make</code> powerful enough for this already? I know it's not part of official Cargo, but it's not out of the question that someday we might integrate <code>cargo make</code> functionality into <code>cargo build</code> or something like that, to make things vastly simpler for projects with FFI or which otherwise depend on <code>cargo make</code> running to get a full functional build.</p>



<a name="204678946"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/cargo%20for%20rustc/near/204678946" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/cargo.20for.20rustc.html#204678946">(Jul 22 2020 at 15:11)</a>:</h4>
<p>I think we could plausibly switch to cargo subcommands but it'd be a big migration and not really worth it IMO</p>



<a name="204679039"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/cargo%20for%20rustc/near/204679039" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/cargo.20for.20rustc.html#204679039">(Jul 22 2020 at 15:12)</a>:</h4>
<div class="codehilite"><pre><span></span><code>alias cargo-bootstrap x.py
</code></pre></div>



<a name="204679370"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/cargo%20for%20rustc/near/204679370" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/cargo.20for.20rustc.html#204679370">(Jul 22 2020 at 15:14)</a>:</h4>
<p><span class="user-mention silent" data-user-id="116155">Jake Goulding</span> <a href="#narrow/stream/182449-t-compiler.2Fhelp/topic/cargo.20for.20rustc/near/204679039">said</a>:</p>
<blockquote>
<div class="codehilite"><pre><span></span><code>alias cargo-bootstrap x.py
</code></pre></div>


</blockquote>
<p>in case anyone does want to use that - <code>alias cargo-bootstrap='cd $(git rev-parse --show-toplevel) &amp;&amp; ./x.py'</code> should work even if you're not in the top-level directory</p>



<a name="204679431"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/cargo%20for%20rustc/near/204679431" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/cargo.20for.20rustc.html#204679431">(Jul 22 2020 at 15:15)</a>:</h4>
<p>it won't work with <code>cargo bootstrap</code> though because it's an alias, you'll have to put it in <code>~/bin/cargo-bootstrap</code> or something for that to work</p>



<a name="204835845"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/cargo%20for%20rustc/near/204835845" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/cargo.20for.20rustc.html#204835845">(Jul 23 2020 at 18:32)</a>:</h4>
<p>Is the staged bootstrapping that can't be done with Cargo still complex enough that it needs Python, or could it theoretically be done with a shell script?</p>



<a name="204835866"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/cargo%20for%20rustc/near/204835866" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/cargo.20for.20rustc.html#204835866">(Jul 23 2020 at 18:32)</a>:</h4>
<p>It would be nice to reduce the set of tools required to bootstrap Rust.</p>



<a name="204835923"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/cargo%20for%20rustc/near/204835923" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/cargo.20for.20rustc.html#204835923">(Jul 23 2020 at 18:33)</a>:</h4>
<p>Especially since Rust will become part of more and more bootstrap cycles in other parts of a normal system.</p>



<a name="204841754"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/cargo%20for%20rustc/near/204841754" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/cargo.20for.20rustc.html#204841754">(Jul 23 2020 at 19:15)</a>:</h4>
<p><span class="user-mention" data-user-id="239881">@Josh Triplett</span> bootstrap is written in both python and rust. I'm not sure how complicated the pure python bit is, <span class="user-mention" data-user-id="116122">@simulacrum</span> would know better, but here's how big it is:</p>
<div class="codehilite"><pre><span></span><code>(-bash@build-server) ~/.../src/bootstrap $ wc -l *.py
 1026 bootstrap.py
  107 bootstrap_test.py
  474 configure.py
 1607 total
</code></pre></div>



<a name="204841842"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/cargo%20for%20rustc/near/204841842" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/cargo.20for.20rustc.html#204841842">(Jul 23 2020 at 19:16)</a>:</h4>
<p>but it also requires a bunch of host tools as well: <a href="https://rustc-dev-guide.rust-lang.org/building/prerequisites.html#dependencies">https://rustc-dev-guide.rust-lang.org/building/prerequisites.html#dependencies</a></p>



<a name="204841977"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/cargo%20for%20rustc/near/204841977" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/cargo.20for.20rustc.html#204841977">(Jul 23 2020 at 19:17)</a>:</h4>
<p>and it has a bunch of undocumented dependencies, like <code>uname</code></p>



<a name="204842189"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/cargo%20for%20rustc/near/204842189" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/cargo.20for.20rustc.html#204842189">(Jul 23 2020 at 19:19)</a>:</h4>
<p>I think it parses config.toml, which I would hate to have to do in shell</p>



<a name="204843594"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/cargo%20for%20rustc/near/204843594" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/cargo.20for.20rustc.html#204843594">(Jul 23 2020 at 19:31)</a>:</h4>
<p>python is basically "I don't have rust installed and need <em>something</em> to download it for me</p>



<a name="204860457"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/cargo%20for%20rustc/near/204860457" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/cargo.20for.20rustc.html#204860457">(Jul 23 2020 at 22:25)</a>:</h4>
<p>In many cases, I wouldn't want anything downloading binaries by default anyway. :)</p>



<a name="204860526"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/cargo%20for%20rustc/near/204860526" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/cargo.20for.20rustc.html#204860526">(Jul 23 2020 at 22:26)</a>:</h4>
<p>Are there any bits of configuration that need to be parsed by something that runs before the rust bootstrap gets compiled?</p>



<a name="204860722"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/cargo%20for%20rustc/near/204860722" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/cargo.20for.20rustc.html#204860722">(Jul 23 2020 at 22:29)</a>:</h4>
<p>Hm, so I want to say mostly no -- or at least it wouldn't be mandatory to do so</p>



<a name="204860737"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/cargo%20for%20rustc/near/204860737" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/cargo.20for.20rustc.html#204860737">(Jul 23 2020 at 22:29)</a>:</h4>
<p>you could definitely run the bootstrap manually if you had a rust compiler around to build it with</p>



<a name="204860800"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/cargo%20for%20rustc/near/204860800" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/cargo.20for.20rustc.html#204860800">(Jul 23 2020 at 22:30)</a>:</h4>
<p>there's a bunch of bits it expects the python script to extract for it and pass in, but there's no reason that python couldn't be bypassed</p>



<a name="204860822"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/cargo%20for%20rustc/near/204860822" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/cargo.20for.20rustc.html#204860822">(Jul 23 2020 at 22:30)</a>:</h4>
<p>That said, the situation in which you <em>do</em> have a Rust compiler but don't have python seems unlikely?</p>



<a name="204860851"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/cargo%20for%20rustc/near/204860851" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/cargo.20for.20rustc.html#204860851">(Jul 23 2020 at 22:31)</a>:</h4>
<p>Bootstrapping Rust without the rust build system is not possible, though</p>



<a name="204860958"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/cargo%20for%20rustc/near/204860958" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/cargo.20for.20rustc.html#204860958">(Jul 23 2020 at 22:32)</a>:</h4>
<p>To be clear, our current setup is:</p>
<ol>
<li>Run x.py / bootstrap.py -- this detects the current architecture, (optionally) downloads a toolchain, and builds the rust portion of the build system with that toolchain</li>
<li>Run the rust build system, this is pretty complex today, I wouldn't want to replace it with anything else</li>
<li>Rust build system (rustbuild) invokes cargo a bunch of times</li>
</ol>



<a name="204860999"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/cargo%20for%20rustc/near/204860999" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/cargo.20for.20rustc.html#204860999">(Jul 23 2020 at 22:33)</a>:</h4>
<p>I guess gcc and clang either use cmake or makefiles directly instead of having something like rustbuild</p>



<a name="204861018"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/cargo%20for%20rustc/near/204861018" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/cargo.20for.20rustc.html#204861018">(Jul 23 2020 at 22:33)</a>:</h4>
<p>but given that they need a c compiler <em>anyway</em> I'm not sure that's very helpful</p>



<a name="204861488"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/cargo%20for%20rustc/near/204861488" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/cargo.20for.20rustc.html#204861488">(Jul 23 2020 at 22:40)</a>:</h4>
<p><span class="user-mention silent" data-user-id="116122">simulacrum</span> <a href="#narrow/stream/182449-t-compiler.2Fhelp/topic/cargo.20for.20rustc/near/204860737">said</a>:</p>
<blockquote>
<p>you could definitely run the bootstrap manually if you had a rust compiler around to build it with</p>
</blockquote>
<p>I mean, maybe in the abstract sense it's possible, but I don't think you could do it and still have all the options in config.toml work: <a href="https://github.com/rust-lang/rust/blob/master/src/bootstrap/bootstrap.py#L707">https://github.com/rust-lang/rust/blob/master/src/bootstrap/bootstrap.py#L707</a></p>



<a name="204862420"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/cargo%20for%20rustc/near/204862420" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/cargo.20for.20rustc.html#204862420">(Jul 23 2020 at 22:53)</a>:</h4>
<p>I guess that's sort of true? But seems not too interesting</p>



<a name="204862488"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/cargo%20for%20rustc/near/204862488" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/cargo.20for.20rustc.html#204862488">(Jul 23 2020 at 22:54)</a>:</h4>
<p>like, if you're running <code>cargo build</code> yourself "of course" you'll need to specify options to it yourself</p>



<a name="204862556"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/cargo%20for%20rustc/near/204862556" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/cargo.20for.20rustc.html#204862556">(Jul 23 2020 at 22:55)</a>:</h4>
<p>that said, I would love to get cargo to natively support a bunch of the options we currently need to feed to it from config.toml</p>



<a name="204862576"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/cargo%20for%20rustc/near/204862576" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/cargo.20for.20rustc.html#204862576">(Jul 23 2020 at 22:55)</a>:</h4>
<p>things like switching debuginfo on/off and such for subsets of packages via configuration that's not Cargo.toml would be great</p>



<a name="204862603"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/cargo%20for%20rustc/near/204862603" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/cargo.20for.20rustc.html#204862603">(Jul 23 2020 at 22:55)</a>:</h4>
<p>(Probably solveable today with "just" support for something like <code>include = "./config.toml"</code> which acts optionally)</p>



<a name="204862655"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/cargo%20for%20rustc/near/204862655" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/cargo.20for.20rustc.html#204862655">(Jul 23 2020 at 22:56)</a>:</h4>
<p>I've meant to talk to Cargo team about this for a while now but haven't found the time</p>



<a name="204862726"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/cargo%20for%20rustc/near/204862726" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/cargo.20for.20rustc.html#204862726">(Jul 23 2020 at 22:57)</a>:</h4>
<p>I don't think that really moves the needle in terms of whether you can build the compiler with just cargo or not, because all of those flags are optional</p>



<a name="204862907"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/cargo%20for%20rustc/near/204862907" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/cargo.20for.20rustc.html#204862907">(Jul 23 2020 at 22:59)</a>:</h4>
<p><span class="user-mention" data-user-id="239881">@Josh Triplett</span> I would generally be interested in hearing more about the concrete constraints we're dealing with -- or documentation on those -- and would be happy to chat about how we can move Rust's build system closer to those.</p>



<a name="204863073"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/cargo%20for%20rustc/near/204863073" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/cargo.20for.20rustc.html#204863073">(Jul 23 2020 at 23:00)</a>:</h4>
<p><span class="user-mention" data-user-id="116122">@simulacrum</span> In general, distributions want to build each version of Rust packages with the previous packaged version of Rust, and not touch the network.</p>



<a name="204863114"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/cargo%20for%20rustc/near/204863114" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/cargo.20for.20rustc.html#204863114">(Jul 23 2020 at 23:01)</a>:</h4>
<p>If that's the only requirement I think we meet support for that fully today.</p>



<a name="204863140"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/cargo%20for%20rustc/near/204863140" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/cargo.20for.20rustc.html#204863140">(Jul 23 2020 at 23:01)</a>:</h4>
<p>The Python requirement isn't a huge problem today, but as more people use Rust in more places, it might be nice to reduce the bootstrapping requirements.</p>



<a name="204863253"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/cargo%20for%20rustc/near/204863253" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/cargo.20for.20rustc.html#204863253">(Jul 23 2020 at 23:02)</a>:</h4>
<p>And yeah, I'd be happy to see Cargo provide more of the needed functionality as well.</p>



<a name="204863284"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/cargo%20for%20rustc/near/204863284" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/cargo.20for.20rustc.html#204863284">(Jul 23 2020 at 23:03)</a>:</h4>
<p>Hm, interesting. I think removing Python is mostly a problem of "defaults" so to speak -- as I mentioned, you can basically do everything it does yourself without all that much trouble</p>



<a name="204863326"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/cargo%20for%20rustc/near/204863326" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/cargo.20for.20rustc.html#204863326">(Jul 23 2020 at 23:03)</a>:</h4>
<p>in some sense <code>cargo run --manifest-path src/bootstrap/Cargo.toml --bin bootstrap -- build --stage 1 src/libstd</code> would mostly work today, with some env variables set and so forth</p>



<a name="204863378"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/cargo%20for%20rustc/near/204863378" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/cargo.20for.20rustc.html#204863378">(Jul 23 2020 at 23:04)</a>:</h4>
<p>and we could likely get that to "just work"</p>



<a name="204863801"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/cargo%20for%20rustc/near/204863801" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/cargo.20for.20rustc.html#204863801">(Jul 23 2020 at 23:09)</a>:</h4>
<p>Run <code>strace</code> on <code>x.py</code>, capture all the command invocations and environment variables it does, then move that to whatever build environment <span aria-label="slight smile" class="emoji emoji-1f642" role="img" title="slight smile">:slight_smile:</span></p>



<a name="209247055"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/cargo%20for%20rustc/near/209247055" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/cargo.20for.20rustc.html#209247055">(Sep 06 2020 at 23:48)</a>:</h4>
<p>Python is actually a bit more of an obstacle for building than I think is being stated, lots of people have trouble when interacting with their Python configurations, even on Unix systems which usually don't give Python that much grief, and it introduces a knowledge dependency for contributors.</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>